//
//  File.swift
//  vr_web
//
//  Created by 李旭峰 on 2020/7/13.
//

import Foundation

protocol IconFontSettable {
    associatedtype defaultKeys: RawRepresentable
}

extension IconFontSettable where defaultKeys.RawValue == String {
    static func set(value: String?, forkey key: defaultKeys) {
        let aKey = key.rawValue
        UserDefaults.standard.setValue(value, forKey: aKey)
    }
    static func iconImage(withIconKey iconKey:defaultKeys, fontSize:CGFloat, color:UIColor) -> UIImage? {
        return nil
//        let normalIconInfo = TBCityIconInfo(text: iconKey.rawValue, size: Int(fontSize), color: color)
//        return UIImage.icon(with: normalIconInfo)?.withRenderingMode(UIImage.RenderingMode.alwaysOriginal)
    }
}
extension UIImage {
    struct IconImage : IconFontSettable {
        enum defaultKeys : String {
            case fillDropDown_Up = "\u{e714}"
            case fillDropDown_Down = "\u{e713}"
            case funds = "\u{e712}"
            case wechat = "\u{e711}"
            case play = "\u{e710}"
            case redEnvelope = "\u{e70f}"
            case personalCenter = "\u{e70e}"
            case home = "\u{e70d}"
            case record = "\u{e70c}"
            case lineDropDown_Up = "\u{e70b}"
            case roundClear = "\u{e70a}"
            case fillCall = "\u{e709}"
            case insert = "\u{e708}"
            case lineDropDown_Down = "\u{e707}"
            case pushNext = "\u{e706}"
            case clear = "\u{e705}"
            case hollowCall = "\u{e704}"
            case message = "\u{e703}"
            case popBefore = "\u{e702}"
            case join = "\u{e701}"
            case contract = "\u{e700}"
        }
    }
}

